package hczc.longcai.com.hccrowdfunding.activity;

import android.os.Bundle;
import android.os.PersistableBundle;
import android.support.v7.app.AppCompatActivity;
import android.view.ViewGroup;
import android.view.Window;

import hczc.longcai.com.hccrowdfunding.application.BaseApplication;

/**
 * Created by 丛龙宇 on 2016/1/8.
 */
public class BaseActivity extends AppCompatActivity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        BaseApplication.INSTANCE.addActivity(this);
    }

    @Override
    public void setContentView(int layoutResID) {
        super.setContentView(layoutResID);
        BaseApplication.scaleScreenHelper.loadView(((ViewGroup) getWindow().getDecorView()));
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        BaseApplication.INSTANCE.finishActivity(this);

    }
}
